<script>
	import {
		storeToRefs
	} from 'pinia';
	import useStore from "@/stores/index.js";
	import useWechat from "@/hooks/useWechat.js";
	const {
		setConfig
	} = useWechat();
	export default {
		onLaunch: function(res) {
			const {
				useLoginStore
			} = useStore();

			let query = res.query;

			let invitation = query.invitation;
			if (query.invitation) {
				uni.setStorageSync('invitation', invitation);
			}

			// uni.setStorageSync('token', "a7e18df88be0bf821e8267b20417b332")
			// let code = query?.code || "owkgP6O9VuH5ivNWyczZLemLuxvA";
			let code = query.code;
			if (code) {
				useLoginStore.setCode(code);
			}
			setConfig();
		},
		onShow: function() {},
		onHide: function() {}
	}
</script>

<style lang="scss">
	// body {
	// 	background: $background;
	// }

	* {
		line-height: 1;
	}

	image {
		pointer-events: none;
	}

	// 下面的可删除
	.test {
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;


		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
</style>